package eiisan.dao.param.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 用户登录请求参数
 */
@Data
@NoArgsConstructor
@ApiModel(description = "用户登录请求参数")
public class DoLogin implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 用户名
	 */
	@NotBlank
	@Length(min = 3, max = 25)
	@ApiModelProperty(value = "用户名", required = true)
	private String username;

	/**
	 * 密码
	 */
	@NotBlank
	@Length(min = 8, max = 30)
	@ApiModelProperty(value = "密码", required = true)
	private String password;

	private String code;

	private String uuid = "";

	@Override
	public String toString() {
		return "{username=" + username  + ", password= ******}";
	}
}
